//
//  AppController.m
//  Chapt14_CaseTool_v14-01
//
//  Created by Ronald Ram on 13/04/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "AppController.h"


@implementation AppController

-(id) init
{
    if (self = [super init])
    {
        NSLog(@"init: text %@, result %@", textField, resultsField);
    }
    return (self);
}

-(void) awakeFromNib
{
    NSLog(@"awake: test %@ / results %@,", textField, resultsField);
    
    [textField setStringValue: @"Enter Text Here"];
    [textField setStringValue: @"Results"];
}

-(IBAction) uppercase: (id) sender
{
    //do something...
    NSString *orig;
    orig = [textField stringValue];
    
    NSString *uppercase;
    uppercase = [orig uppercaseString];
    
    [resultsField setStringValue: uppercase];
}

-(IBAction) lowercase: (id) sender
{
    //do something...
    NSString *orig;
    orig = [textField stringValue];
    
    NSString * lowercase;
    lowercase = [orig lowercaseString];
    
    [resultsField setStringValue: lowercase];
}

@end
